home *** CD-ROM | disk | FTP | other *** search
- /* graphics libraries:
- layout edit library interfaces: a Simple layout editing based on the TextEdit model.
- by Dave Opstad, Eric Mader
- Copyright 1992 - 1993 Apple Computer, Inc. All rights reserved. */
-
- #pragma once
- #ifndef layoutEditLibraryIncludes
- #define layoutEditLibraryIncludes
-
- #include <Types.h>
- #include <Memory.h>
-
- #ifndef selectionLibraryIncludes
- #include "selection library.h"
- #endif
-
- #ifndef layoutTypesIncludes
- #include "layout types.h"
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef Handle LayoutEditHandle;
-
- LayoutEditHandle NewLayoutEditHandle(
- long textRunCount,
- const short textRunLengths[],
- const void *text[],
- long styleRunCount,
- const short styleRunLengths[],
- const gxStyle styles[],
- long levelRunCount,
- const short levelRunLengths[],
- const short levels[],
- gxLayoutOptions *layoutOptions,
- gxPoint *position,
- gxStyle defaultStyle);
-
- LayoutEditHandle LayoutEditHandleFromLayout(gxShape layout);
-
- long GetLayoutEditHandle(
- LayoutEditHandle handle,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[],
- gxLayoutOptions *layoutOptions,
- gxPoint *position);
-
- void SetLayoutEditHandle(
- LayoutEditHandle handle,
- long textRunCount,
- const short textRunLengths[],
- const void *text[],
- long styleRunCount,
- const short styleRunLengths[],
- const gxStyle styles[],
- long levelRunCount,
- const short levelRunLengths[],
- const short levels[],
- const gxLayoutOptions *layoutOptions,
- const gxPoint *position);
-
- void SetLayoutEditHandleParts(
- LayoutEditHandle handle,
- gxByteOffset oldStartOffset,
- gxByteOffset oldEndOffset,
- long newTextRunCount,
- const short newTextRunLengths[],
- const void *newText[],
- long newStyleRunCount,
- const short newStyleRunLengths[],
- const gxStyle newStyles[],
- long newLevelRunCount,
- const short newLevelRunLengths[],
- const short newLevels[]);
-
- void SetLayoutEditHandleSelectedParts(
- LayoutEditHandle handle,
- long newTextRunCount,
- const short newTextRunLengths[],
- const void *newText[],
- long newStyleRunCount,
- const short newStyleRunLengths[],
- const gxStyle newStyles[],
- long newLevelRunCount,
- const short newLevelRunLengths[],
- const short newLevels[]);
-
- void SetLayoutEditHandleShapeParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- gxShape insert);
-
- long GetLayoutEditHandleParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[]);
-
- long GetLayoutEditHandleSelectedParts(
- LayoutEditHandle handle,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[]);
-
- gxShape GetLayoutEditHandleShapeParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- gxShape dest);
-
- void LayoutEditRotateShape(LayoutEditHandle handle, fixed degrees, fixed translateX, fixed translateY);
-
- void LayoutEditIdle(LayoutEditHandle handle);
-
- void LayoutEditClick(LayoutEditHandle handle, gxPoint hitDown);
-
- void LayoutEditActivate(LayoutEditHandle handle);
-
- void LayoutEditDeactivate(LayoutEditHandle handle);
-
- void LayoutEditKey(LayoutEditHandle handle, char key);
-
- void LayoutEditUpdate(LayoutEditHandle handle);
-
- SelectionHandle LayoutEditGetSelection(LayoutEditHandle handle);
-
- void LayoutEditSetSelection(LayoutEditHandle handle, SelectionOffset start, SelectionOffset end);
-
- void LayoutEditSetSelectionHandle(LayoutEditHandle handle, SelectionHandle selection);
-
- gxViewPort GetLayoutEditViewPort(LayoutEditHandle handle);
-
- void LayoutEditSetStyle(LayoutEditHandle handle, gxStyle newStyle);
- void LayoutEditIncrementLevel(LayoutEditHandle handle);
- void LayoutEditDecrementLevel(LayoutEditHandle handle);
- void LayoutEditSetLevel(LayoutEditHandle handle, long level);
-
- void LayoutEditCut(LayoutEditHandle handle);
- void LayoutEditCopy(LayoutEditHandle handle);
- void LayoutEditPaste(LayoutEditHandle handle);
- void LayoutEditClear(LayoutEditHandle handle);
-
- void LayoutEditFromScrap(LayoutEditHandle handle);
- void LayoutEditToScrap(LayoutEditHandle handle);
-
- void DisposeLayoutEditHandle(LayoutEditHandle handle);
-
- #ifdef __cplusplus
- }
- #endif
- #endif
-